cs-apolo-sapi icon

cs-apolo-sapi

(0 reviews)

πŸ“˜ API Documentation - cs-apolo-sapi

This section describes the attributes and usage of the cs-apolo-sapi service.


πŸ’‚οΈ Base Information

  • API Title: cs-apolo-sapi
  • Version: 1.0.0
  • Base URL: https://cs-apolo-sapi-v1-{env}.us-e1.cloudhub.io/api/Replace the environment segment with:
  • dev (Development)
  • qa (Quality Assurance)

πŸ”‘ Authentication

Required Headers

HeaderTypeDescription
client_idStringUnique identifier for API clients
invokerStringJSON with caller information
  • client_id
    • Length: 32 - 36 characters
    • Example: 123e4567-e89b-12d3-a456-426614174000
  • invoker
    • Example: { "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }

> πŸ“Œ These headers are required in all requests.

πŸ”’ Endpoint: Create Dependent Worker

POST /create-dependent-worker

  • Description: Creates a new dependent worker in the system.

Complete URL

https://cs-apolo-sapi-v1-dev.us-e1.cloudhub.io/api/create-dependent-worker

HTTP Method

POST

Required Headers

client_id: YOUR_CLIENT_ID
invoker: { "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }
Content-Type: application/json

Authentication

Client ID enforcement and oauth2

Request Body

{
  "worker": {
    "firstName": "Juan",
    "lastName": "PΓ©rez",
    "identificationType": "CC",
    "identificationNumber": "1234567890",
    "birthDate": "1985-06-15",
    "gender": "M",
    "email": "juan.perez@example.com",
    "phone": "3107894561",
    "address": "Calle 123 # 45-67",
    "cityCode": "11001"
  },
  "contract": {
    "consecutiveContract": "59",
    "consecutiveHeadquarter": "483",
    "workCenter": "1",
    "salary": "1500000",
    "position": "Analista",
    "startDate": "2025-01-15",
    "riskLevel": "2",
    "workday": "D",
    "epsCode": "EPS001",
    "afpCode": "AFP001"
  }
}

Example Request

curl -X POST "https://cs-apolo-sapi-v1-dev.us-e1.cloudhub.io/api/create-dependent-worker" \
-H "client_id: YOUR_CLIENT_ID" \
-H "invoker: { \"application\": \"Portal\",\"addressIPUser\": \"192.168.80.13\",\"loginUser\": \"User\",\"userName\": \"User Name\" }" \
-H "Content-Type: application/json" \
-d '{
  "worker": {
    "firstName": "Juan",
    "lastName": "PΓ©rez",
    "identificationType": "CC",
    "identificationNumber": "1234567890",
    "birthDate": "1985-06-15",
    "gender": "M",
    "email": "juan.perez@example.com",
    "phone": "3107894561",
    "address": "Calle 123 # 45-67",
    "cityCode": "11001"
  },
  "contract": {
    "consecutiveContract": "59",
    "consecutiveHeadquarter": "483",
    "workCenter": "1",
    "salary": "1500000",
    "position": "Analista",
    "startDate": "2025-01-15",
    "riskLevel": "2",
    "workday": "D",
    "epsCode": "EPS001",
    "afpCode": "AFP001"
  }
}'

Example Response

{
  "status": "SUCCESS",
  "code": "200",
  "message": "Dependent worker created successfully",
  "data": {
    "workerConsecutive": "7845623",
    "identificationNumber": "1234567890",
    "identificationType": "CC",
    "contractConsecutive": "59",
    "affiliationDate": "2025-01-15T00:00:00Z"
  }
}

⚠️ Error Codes

CodeDescriptionSuggested Solution
400Bad RequestCheck request syntax and parameters.
401UnauthorizedValidate authentication credentials.
404Not FoundConfirm the endpoint URL.
500Internal Server ErrorRetry or contact technical support.

πŸ“ž Support

For assistance, contact the Integration Services and Applications Coordination team.

Email: epalma@fgs.co


Reviews